package top.qitun.common.api.gateway;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import top.qitun.bizz.catalog.product.entity.ProductBO;
import top.qitun.model.response.ObjectCollectionResponse;
import top.qitun.model.response.ObjectDataResponse;

@FeignClient(name="catalog-ms")
public interface CatalogServiceAPI {
	
	@RequestMapping(value = "v1/product/{id}", method = RequestMethod.GET)
	ObjectDataResponse<ProductBO> queryProductById(@PathVariable("id") Integer productId);

	@RequestMapping(value = "v1/product/table/{id}", method = RequestMethod.GET)
	ObjectCollectionResponse<ProductBO> queryProductByTableId(@PathVariable("id") Integer tableId);
}
